<?php
//Loading config
include_once($_SERVER['DOCUMENT_ROOT'] ."/kse/cfg.php");
include_once($_SERVER['DOCUMENT_ROOT'] ."/kse/names.php");

//Loading controller
include_once("kse". DIRSEP . "core". DIRSEP . kse_mode . DIRSEP . "controller.php");

$route = (empty($_GET["route"])) ? "" : $_GET["route"];
//print_r($_GET);
//echo "route - ". $route ."<br>";die();
parse($route);

/*
$data = array ('Email' => 'st.ixidor@gmail.com', 'Passwd' => 'googlecn3xs1xs1');
$data = http_build_query($data);

$context_options = array (
        'http' => array (
            'method' => 'POST',
            'header'=> "Content-type: application/x-www-form-urlencoded\r\n"
                ."Content-Length: " . strlen($data) . "\r\n",
            'content' => $data
            )
        );

$context = stream_context_create($context_options);
$fp = fopen('https://www.google.com/accounts/ServiceLoginAuth', 'r', false, $context);

echo "||||||||||||||||||";
print_r($context);
fpassthru($fp);
fclose($fp);
*/

/*
 works
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"https://www.google.com/accounts/ServiceLoginAuth");
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$result=curl_exec ($ch);
curl_close ($ch);

print_r($result);*/
?>
